//
//  OrderInfoTableViewController.m
//  HaiGoumerMerchant
//
//  Created by apple on 17/1/20.
//  Copyright © 2017年 com.zaoguankeji.www. All rights reserved.
//

#import "OrderInfoTableViewController.h"
#import "OrderInfoTableViewCell.h"
#import "OrderInfoFooterTableViewCell.h"
#import "OrderInfoHeaderTableViewCell.h"

static   NSString * const kCellInfoID = @"OrderInfoTableViewCell";
static   NSString * const kCellInfoHeaderID = @"OrderInfoHeaderTableViewCell";
static   NSString * const kCellInfoFooterID = @"OrderInfoFooterTableViewCell";

@interface OrderInfoTableViewController ()
@property (nonatomic, strong) NSMutableArray *dataArr;

@end

@implementation OrderInfoTableViewController


#pragma mark -----------dataArr-------------------懒加载;
- (NSMutableArray *)dataArr{
    if (!_dataArr) {
        self.dataArr = [NSMutableArray array];
    }
    
    return _dataArr;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"订单列表";
    self.dataArr = @[@"44",@"55"];
    [self configureOrderInfoViewControllerTableView];
//    [self.tableView setTableHeaderView:self.myTableviewFooter];
   }

- (void)configureOrderInfoViewControllerTableView {
    self.tableView.tableFooterView = [UIView new];
    self.tableView.rowHeight = UITableViewAutomaticDimension;
    self.tableView.estimatedRowHeight = 130;
    //    self.tableView.estimatedSectionFooterHeight = 100;
    self.tableView.estimatedSectionHeaderHeight = 100;
    self.tableView.tableFooterView = [self.tableView dequeueReusableCellWithIdentifier:kCellInfoFooterID];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    return [tableView dequeueReusableCellWithIdentifier:kCellInfoHeaderID];
    
}

//- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
//    
//    return
//}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 54;
}
//- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
//    return 178;
//}
#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
#warning Incomplete implementation, return the number of sections
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
#warning Incomplete implementation, return the number of rows
    return self.dataArr.count > 0 ? self.dataArr.count : 0;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    OrderInfoTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellInfoID forIndexPath:indexPath];
    
    
    
    return cell;
}



@end
